﻿<UserControl x:Class="PurchaseSales.Manage.Views.UserControls.AddSupplier"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:inf="clr-namespace:PurchaseSales.Manage.Common.Validates"
             >
    <StackPanel>
        <TextBlock Text="编号：" VerticalAlignment="Center" Margin="0 10"/>
        <TextBox x:Name="Element_Number" Text="{Binding Entity.Number, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <TextBlock Text="供应商名称："  Margin="0 10"/>
        <TextBox x:Name="Element_Name" Text="{Binding Entity.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <TextBlock Text="电话号码："  Margin="0 10"/>
        <TextBox  Text="{Binding Entity.Tel, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <TextBlock Text="手机号码：" Grid.Row="1" Margin="0 10"/>
        <TextBox Text="{Binding Entity.Phone, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <TextBlock Text="地址：" Grid.Row="1" Margin="0 10"/>
        <TextBox Text="{Binding Entity.Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <TextBlock Text="条形码：" Grid.Row="1" Margin="0 10"/>
        <TextBox Text="{Binding Entity.PostCode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <TextBlock Text="联系人：" Grid.Row="1" Margin="0 10"/>
        <TextBox Text="{Binding Entity.ContactPerson, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />


        <inf:RequiredValidator Property="{Binding Text,ElementName=Element_Number}"
                                  TriggerElement="{Binding ElementName=Element_Number}"/>
        <inf:RequiredValidator Property="{Binding Text,ElementName=Element_Name}"
                                  TriggerElement="{Binding ElementName=Element_Name}"/>
    </StackPanel>
</UserControl>
